<form id="nlForm" name="nlForm" method="POST" action="#">
    <fieldset>
        <legend class="well well-small">Проверка связи</legend>

        <?php /*
        <div class="control-group">
            <p>Интервал времени:</p>
            <label for="from_date" class="control-label">с <input type="text" value="2010-01-01" name="from_date" id="from_date" class="input-medium hasDatepicker"> </label>
            <label for="to_date" class="control-label"> по <input type="text" value="2012-06-28" name="to_date" id="to_date" class="input-medium hasDatepicker"> </label>

            <button class="btn btn-primary" type="submit"><i class="icon-ok-sign icon-white"></i> Показать</button>
        </div>



        <div class="control-group" id="nd-buttons">
            <div  id="ndSearchProgress" >
                <p class="help-block">Поиск...</p>
                <div class="progress progress-info" style="height: 5px;" title="0%">
                    <div class="bar" style=" width: 0%;"></div>
                </div>
            </div>

            <div class="span4" style="white-space:nowrap;">
                <button id="btn-yesterday" class="btn btn-info" type="button" days="1"><i class="icon-calendar icon-white"></i> За вчера</button>
                <button id="btn-week" class="btn btn-info" type="button" days="7"><i class="icon-calendar icon-white"></i> За 7 дней</button>
                <button id="btn-month" class="btn btn-info" type="button" days="30"><i class="icon-calendar icon-white"></i> За 30 дней</button>
            </div>


        </div>

        */?>
    </fieldset>
</form>


<?php
$e = Arr::getValue($params, 'error', false);

if ($e) {?>
<div class="alert alert-danger"> <?php echo $e; ?> </div>
<?php } ?>


<ul class="thumbnails span7" id="ul-noLink">
<?php
$found = Arr::getValue($params, 'found', array());
if (is_array($found)) {
    if (!count($found)) {
        ?>
    <li class="span7 well well-small">Проблем не обнаружено.</li>
        <?php
    }
    else foreach ($found as $name=>$data) {
        $objectsHtml = '';
        $objects = Arr::getValue($data, 'objects', array());
        $notice = Arr::getValue($data, 'notice', '');

        $what =  Arr::getValue($data, 'what', array());
        $lm = (int)Arr::getValue($data, 'datelm', time());
        if ($lm < 10000000) $date = '?';
        else $datelm =  date('Y-m-d H:i:s', $lm);

        if ($what == Page_mon::NL_LOGFILEEXP) $outdate = "<p>Последнее соединение: $datelm</p>";
        else $outdate = '';


        foreach ($objects as $obj) {
            //$objectsHtml .= '<li obj_id="'.$obj['id'].'" >'.$obj['obj_name']."</li>\n";
            $objectsHtml .= '<tr><td obj_id="'.$obj['id'].'" >'.$obj['obj_name']."</td></tr>\n";
        }
        ?>
    <li class="span7 well well-small">
        <div class="span3">
            <h3><?php echo $name;?></h3>
            <p>&nbsp;</p>
            <p><strong><i class="icon-warning-sign"></i> <?php echo $what;?></strong></p>
            <p><?php echo $outdate;?></p>

        </div>


        <div class="pull-right span3"  style="float:right; padding-left: 10px;">
            <p style="min-width: 400px;"><?php echo $notice;?></p>
            <?php if (count($objects)) { ?>
            <p style="min-width: 400px;"><strong>Отображения:</strong></p>
            <table class="table table-striped table-bordered table-condensed">
                <?php echo $objectsHtml;?>
            </table>
            <?php } ?>
        </div>


    </li>
        <?php
    }

}
?>
</ul>
<?php /*
<pre>
DEBUG:  found=<?php print_r(Arr::getValue($params, 'found', array())); ?>
</pre>
*/ ?>
